<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.web.new12306.conn.*" %> 
<!-- 苗宇 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>12306购票系统</title>
<link rel="stylesheet" type="text/css" href="js/util/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="js/util/easyui/themes/icon.css">
<script type="text/javascript" src="js/util/jquery/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/util/easyui/jquery.easyui.min.js"></script>
<style type="text/css">
.left{
float:right;
width:150px;}
.td1{
 width:98px; 
 height:20px;
}
.td2{
width:136;
}
.td3{
 width:55;
}
.td4{
 width:44;
}

</style>


</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
 <div class="left">
 <input type="button" class="easyui-linkbutton" iconCls="icon-ok" style="width:100%; height: 32px" onclick="window.location.href='adminLogin.jsp'"value="管理员登录">
</div>    
 <form name="form1" method="post" action="LoginServlet?action=login">
 <h2><center>用户登录</center></h2>
    <div style="margin-left:400px">
    <div class="easyui-panel" style="width:500px;padding:50px 60px"">
    <table  width="400" border="0">
    <tr>  
        <td class="td1"  align="right">用户名:</td>
        <td class="td2" ><input class="easyui-textbox" name="username" prompt="Username" iconWidth="28" style="width:100%;height:34px;padding:10px;"></td>
        <td class="td3">&nbsp;</td>
        <td class="td4">&nbsp;</td>
      
    </tr>
    <tr>
        <td height="20" colspan="4" align="center"></td>
    </tr>
    
    <tr>
        <td class="td1" align="right">密码:</td>
        <td class="td2"><input class="easyui-passwordbox" name="password" prompt="Password" iconWidth="28" style="width:100%;height:34px;padding:10px"></td>
        <td class="td3">&nbsp;</td>
        <td class="td4">&nbsp;</td>
    </tr>
    <tr>
        <td height="20" colspan="4" align="center"></td>
    </tr>
    <tr>
         <td class="td1" align="right">验证码:</td>
         <td class="td2"><input class="easyui-textbox" name="code" prompt="code" iconWidth="28" style="width:100%;height:34px;padding:10px;"></td>
         <td class="td3"><span class="text_cray1"><img id="codeImg" src="code" alt="点击换一张" style="cursor: hand" 
             onclick="javascript:reloadcode()" height="20" /></span></td>
        <td class="td4"></td>
      </tr>
      <tr>
        <td height="20" colspan="4" align="center"></td>
    </tr>
     <tr>
        <td height="20" colspan="4" align="center"></td>
    </tr>    
      <tr>
            <td class="td1" align="right"></td>
            <td class="td2">
            <input type="submit" class="easyui-linkbutton" iconCls="icon-ok" style="width: 35%; height: 32px" value="登录" ">
            &nbsp;&nbsp;
            <input type="button" class="easyui-linkbutton" iconCls="icon-ok" style="width:35%; height: 32px" onclick="window.location.href='register.jsp'"value="注册">
            </td>
            <td class="td3"></td>
            <td class="td4"></td>
          </tr>

       <tr>
        <td height="20" colspan="4" align="center">
			<%
			String msg =(String)request.getAttribute("msg");
			if (msg!=null) {
				%>
				<%= msg %>
				<%
			}
			%>
		</td>
      </tr>
    </table>
    
    <script language="javascript">
	  function reloadcode() {
		document.getElementById("codeImg").src = "code?" + new Date();
	}
	</script>
 
   </div>    
</div>
</form>
</body>
</html>
